<?php
class indexControl extends commonControl{
    function index(){
       $this->display();
    }
    function arc(){
        $id = $_GET['id'];
        $db= K("newsv");
        $row= $db->find($id);
        $this->assign("field",$row);
        $this->display();
    }
    function l(){
        $cid = $_GET['catid'];
        $db = K("newsv");
        $count = $db->where("news.catid=$cid")->count();
        $arc = $db->where("news.catid=$cid")->limit(10)->all();
        $arc = getarcurl($arc);
        $this->assign("news",$arc);
        $this->display();
    }
    function changeclick(){
        C("debug",0);
        $id =$_GET['id'];
        $db = M("news");
        $db->inc("click","id=$id",1);
        $row = $db->find($id);
        echo "document.write(".$row['click'].")";
    }
}